<script>
	export default {
		/**
		 * 初始化完成时触发
		 */
		onLaunch() {
			this.isLogin()
		},
		methods: {
			/**
			 * 检测登陆状态
			 * */
			isLogin() {
				const token = uni.getStorageSync('trioToken')
				if (token) {
					uni.reLaunch({
						url: '/pages/Workbench/index',
					});
				} else {
					uni.reLaunch({
						url: '/pages/Login/login'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-plus/index.scss";
	/*每个页面公共css */
	@import "@/style/common.scss";
</style>